package com.sun.spring5.annotations;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.context.annotation.FilterType;

@Configuration
@ComponentScan(value="com.sun.spring5.annotations",excludeFilters = {
        @Filter(type = FilterType.CUSTOM,classes = MyTypeFilter.class)
})
public class MyConfig {

    @Bean("person")
    public Person son(){
        return new Person("张三",20);
    }
}
